#pragma once
#include <queue>
#include <map>
#include "Cell.h"
#include <boost/thread.hpp>
#include <boost/interprocess/ipc/message_queue.hpp>

using namespace boost;

class MyQueue :
	public queue<Cell *>
{
private:
	bool finished;
	boost::condition_variable condQMfinished;
	boost::condition_variable condQPadded;
	boost::condition_variable condQMadded;
	boost::condition_variable condWhFinished;
	boost::condition_variable condBlFinished;
	boost::condition_variable condGrFinished;

	
public:
	MyQueue(void);
	~MyQueue(void);
	int queueManager();
	int queueProcessor();
	int blackProcessor(Cell *, multimap<int*, Cell*>);
	int whiteProcessor(Cell *, multimap<int*, Cell*>);
	int otherProcessor(Cell *, multimap<int*, Cell*>);
	
	boost::mutex mutQM, mutQP;
};

